<?php

/**
 * API名称: 苹果验证接口
 * 测试链接:
 * http://localhost/ordws/?json={"op_type":100002,"receipt_data":"base64","password":"pwd","build_id":"com.yslkjgs.yijianjie","device_id":"35be1ae073374464afc6d7da3c70be7f","task_id":"123","c_ver":"43","c_type":"1"}
 */

class Api_100002 extends PackBase
{
    public function __construct($pack)
    {
        parent::__construct($pack);
    }

    public function setPack($pack)
    {
    }

    public function setRequiredParms()
    {
        return array("device_id", "receipt_data", "build_id", "c_ver", "c_type");
    }

    public function run()
    {
        $func = new \Func\Func100000();
        $data = $func->F100002($this->device_id, $this->receipt_data, $this->password, $this->build_id, $this->environment, $this->verify_type, $this->c_ver, $this->c_type);
        $this->outModel->AddOutInfo("code", $data["code"]);
        $this->outModel->AddOutInfo("msg", $data["error"]);
        $this->outModel->AddOutInfo("data", $data["data"]);
    }
}
